import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

// main.js，注意要在use方法之后执行
import uView from '@/uni_modules/uview-ui'

import * as http from './common/http' // http请求接口
import storage from './common/storage' // 缓存文件
import config from '@/config' // 配置
import Player from '@/components/Player.vue'
import floatingBall from '@/components/floatingBall.vue'
import store from './store/store.js'  
Vue.prototype.$store = store  
// 定义全局
Vue.prototype.$storage = storage
Vue.prototype.$http = http
Vue.prototype.$config = config
Vue.prototype.$document = null;

Vue.prototype.$scroll = {
	top:0
};

Vue.component('player',Player);
Vue.component('floatingBall',floatingBall);
Vue.use(uView);

const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif